<?php

namespace app\common\model;



/**
 * 关注模型
 */
class Attention extends BaseModel
{
    protected $updateTime = false;
    public function user()
    {
        return $this->belongsTo('User','user_id','id')->field('id,nickname,avatar,bio,education');
    }

    public function dynamic()
    {
        return $this->belongsTo('Dynamic','dynamic_id','id');
    }

    public function toUser()
    {
        return $this->hasOne('User','id','att_user_id')->field('id,nickname,avatar,bio,education');
    }

}
